﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class User_UserStatus : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (string.IsNullOrEmpty(Context.User.Identity.Name))
            {
                lbtnRegister.Visible = true;
                lbtnLogin.Visible = true;
                lbtnUser.Visible = false;
            }
            else
            {
                lbtnRegister.Visible = false;
                lbtnLogin.Visible = false;
                lbtnUser.Visible = true;
                lbtnUser.Text = Context.User.Identity.Name;
            }
        }
    }
    protected void lbtnRegister_Click(object sender, EventArgs e)
    {
        Response.Redirect(@"~/User/RegisterUser.aspx");
    }
}